﻿//****************************************************************************//
//
// @File: Messages.cs
// @Owner: lyudmilf
// @Test: 
//
// Purpose:
//
//      All user's messages used in the tool are defined here
//
// Notes:
//      
//      
//
//****************************************************************************//

namespace SSAT.ATSDriver
{
    public static class TroubleshootQueriesForUser
    {
        public const string AlterLogin = "ALTER LOGIN {0}";
        public const string Enable = "ENABLE";
        public const string Go = "GO";
        public const string UseDb = "USE <database_name>";
        public const string SelectFromDbPrincipals = "SELECT * FROM sys.database_principals";
        public const string WithPasswordUnlock = "WITH PASSWORD = '<account_password>' UNLOCK";
        public const string WithPassword = "WITH PASSWORD = '<new_account_password>'";
        public const string SelectFromDatabases = "SELECT name,is_cleanly_shutdown, state_desc,log_reuse_wait_desc, user_access_desc, mirroring_partner_instance, mirroring_partner_name , mirroring_role_desc" +
                                                     "FROM sys.databases db left join sys.database_mirroring dbm on db.name = db_name(dbm.database_id)" +
                                                     "WHERE name = <database_name>";
    }
}
